home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
9-Digit Zip Code Directory
/
9-Digit Zip Code Directory (American Business Information) (ABIZIP-12).ISO
/
z4src.zip
/
Z4PFNDX.C
< prev
next >
Wrap
C/C++ Source or Header
|
1993-07-02
|
2KB
|
79 lines
//----------------------------------------------------------------------------
// MODULE DESCRIPTION
//
// Module: z4pfndx.c
// Title: ZIP+4 Engine
// Notice: John M. Weeder
// Copyright (c) 1993. All rights reserved.
// This module contains proprietary information and should be
// treated as confidential.
//
//----------------------------------------------------------------------------
// MAINTENANCE HISTORY
//
// $Workfile$
// $Revision$
// $Author$
// $Date$
// $Log$
//
//----------------------------------------------------------------------------
// MODULE NARRATIVE
//
//
// This module contains code to index the POF file.
//
// The code in this module should be written entirely in C.
// Do not use any C++ constructs.
//
// This module is portable to:
// DOS 3.X+
// MS Windows 3.X+
// OS/2 2.X+
// OS/2 2.0 PM
// SCO UNIX.
//
// The following compilers are supported:
// MSC 6.0A
// MSC/C++ 7.0
// Borland C++ 3.1 for DOS
// Borland C++ 1.0 for OS/2 2.X
// SCO UNIX cc
//
//----------------------------------------------------------------------------
#include <z4.h>
//----------------------------------------------------------------------------
// Description: Indexing function for POF file.
// Parameters: pdi_index Indexing data
// Returns: TRUE if successful.
//----------------------------------------------------------------------------
BOOL FN_E Z4PFIndex(PDI_INDEX pdi_index)
{
static Z4_PF_BLK pf_blk;
static Z4_PF pf;
switch (pdi_index->lBlock)
{
case ISAM_START:
Assert(MAX_FINANCE_BCD == MAX_PF_KEY);
return Z4PFExpandInitialize(&pf_blk);
case ISAM_END:
return Z4PFExpandTerminate(&pf_blk);
}
// Reset and expand first record
Z4PFExpandReset(&pf_blk, pdi_index->pbBlock, pdi_index->cbBlock);
if (!Z4PFExpand(&pf_blk, &pf))
return FALSE;
// Create key
Z4PFKey(pdi_index->pbKey, pf.szFinance);
pdi_index->cbKey = MAX_PF_KEY;
return TRUE;
}
//----------------------------------------------------------------------------
//------------------------------- End of File --------------------------------
//----------------------------------------------------------------------------